package com.wiki.gds.user.provider.modular.sys.api.impl;


import com.wiki.gds.base.common.dto.ResponseDto;
import com.wiki.gds.base.common.exception.BizExceptionEnum;
import com.wiki.gds.base.common.utils.ResponseDtoFactory;
import com.wiki.gds.base.web.controller.common.BaseController;
import com.wiki.gds.user.facade.sys.api.UserApi;
import com.wiki.gds.user.facade.sys.model.User;
import com.wiki.gds.user.provider.modular.sys.service.UserService;
import org.beetl.sql.core.SQLManager;
import org.beetl.sql.core.SQLReady;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(UserApi.mapping)
public class UserApiImpl extends BaseController implements UserApi {

    @Autowired
    UserService userService;

    @Autowired
    SQLManager sqlManager;

    @Override
    public User getBySelf(@RequestBody User user) {
        return userService.getBySelf(user);
    }

    @Override
    public String TestAAA() {
        return "asdasd";
    }

    @Override
    public ResponseDto<User> insert(User user) {
        ResponseDto rs=new ResponseDto(BizExceptionEnum.SUCCESSFUL_OPERATION);
         Long id= userService.insert(user);

        return null;
    }
}
